Probably many possibilities. Here's what comes to my mind:
If the load is light, you could mount it on a timing belt. It could still be on a linear guide, to keep its motion perfectly straight. One end of the timing belt is an idler pulley (probably with a belt tension adjustment feature), and the other end is the motor. Drive the timing belt with any motor that can produce constant speed with the precision you need.
Conventionally, electromechanical / optical / magnetic limit switches would sense the end positions and trigger motor to reverse direction.
A stepper motor with a small gear reduction may work out too, though the step resolution** may be an issue at 10Hz. In that case, a single limit switch might be sufficient. If the stepper driver electronics can sense stalling (from hitting a hard stop), you can even go with no switch at all. Some fancy industrial ones from FESTO I've used do this, but that is massively overpriced and overkill.
- If the stepper motor step-resolution is not a limitation, you could also use any rotary-to-linear mechanism, and program the stepper motor's motion profile to compensate for the non-linearity.
- Also take a look at windshield-wiper mechanisms, they have a clever mechanical auto-reverse gear shift arrangement that activates when the motion reaches the ends. That could perhaps be used here.
- With any electronically-controlled motor situation, some controlled acceleration at the ends of motion will probably be necessary, as a theoretical triangle profile has infinite acceleration at the ends.
** For stepper motor resolution and gear reduction considerations, use typical values of 200steps/rev, prior to any gear reduction, and a max step rate of 1000 steps/sec