Split 2d array into array of 1d arrays

I did this some time ago as well. Have a look here for the code with some community builds.