This doesn't work for mountain biking, because often the limiting factor is something like frame geometry, which means buying a whole bike to change.
The good news is you can get a decent quality used bike for very decent money, and change cheaper components to suit, things like pedals, seat, handlebars etc are very subjective.