Don't mess with the goPos() block, and make sure loop() runs fast (<= 1953us).
Just fill the newPos array with positions you want the motors to go to.
Like
newPos[] = {100, 165, 220, 350 ....., 490};
Then the goPos() block will take care of the actual motor movements.
Leo..