Budget alternative to fancy linear slide
You could possibly salvage the mechanism from an old printer. The print head is normally carried using a toothed belt and small motor with some type of encoder feedback.