The function would basically just generate all of the ways to partition an array into n buckets while keeping the order of the original array. It would generate an array of arrays of arrays
Function signature:
func(arr, n)
arr = an array of numbers
n = int <= length(arr)
Example function calls:
func([1, 2, 3], 1) would return [ [[1, 2, 3]] ]
func([1, 2, 3], 2) would return [ [[1],[2, 3]], [[1, 2],[3]]]
func([1, 2, 3], 3) would return [ [[1], [2], [3]] ]