Split an array into chunks, each chunk containing no more than a specified number of elements, in order.
The array to be split
The maximum number of elements in each chunk
The array of chunks, where the last chunk may contain fewer elements if the input array length is insufficient.
Split an array into chunks, each chunk containing no more than a specified number of elements, in order.