create a function that splits an array into an array of equal sized chunks