Splits a given array in chunks (sub-arrays). Usage chunkArray(array, 2) - Returns a new array of chunks (sub-arrays) of size 2.