A function breaks arrays into n number of pieces. Passes Jasmine unit tests