slice a buffer into an array of sub-buffers