For example:
I have 100+ location objects, each containing latitude: x, longitude: x values. These are in one long array.
I am using these with the Google distance matrix API to calculate nearby stores for my user. The problem is this API has a limit of 25 destinations per request, so I can't use my array of location objects as it is too big. 
I am looking for a way to make multiple arrays at a max length of 25, and when that array fills, create a new one. A function that does this would be best, so that it works for any number of stores.
 
     
     
     
    