how to create an array with both members and number of members undefined

For the test I'm making sure outPos>inPos.

For rewind, sure. Playback, not so much. Also, rewind and playback are so similar that you should be able to use a common function to do their work.