Add partition, partitionAll, partitionBy

partition produces an array of arrays, each containing n elements, each offset by step (optional).
It also allows an optional padding array which will attempt to fill the last partition to n elements if short.

partitionAll allows the last partition to be less than n elements long without using padding elements.

partitionBy applies a condition to each element in array, splitting it each time the condition returns a new value.
One thing I discovered is that we can avoid this overloaded function by using optional arguments. I was thinking of fixing other overloaded methods in the library to use optional parameters so there is only one method signature. We could do the same here before I merge.