Writes length number of bytes from src into the array with the given offset, and then increments the position.