Splits the array in smallers arrays of a specific maximum size.
It is O(n) in complexity.
Array to split
Maximum size of a batch
Splits the array in smallers arrays of a specific maximum size.
It is O(n) in complexity.