splits a Buffer into an array of buffers