Generation of Accelerating Beams along Arbitrary Trajectories