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

You only set servoTime in setup, when the values of the things you use to calculate it are all zero.

As to using a function for rewind and playback, I'd expect you to pass the delay to it as a parameter. InPos & outPos too of course.