Optimal way of making timed code

I have Arduino Mega and 5 stepper motors for axes of small articulated robot arm. Trying to figure out the best approach for the control of the motors, because I would need to have acceleration/deceleration and simultaneous motor movement from point to point at different speeds.