As long as you'll be comfortable with the top tube length on a smaller frame, there's no reason not to adapt it. Neither the stem nor the seatpost presents an insuperable problem -- both are available with long shafts. For the seatpost, lots of old MTBs (newer ones tend to have fatter tubes) came with really long shafts, and these are regularly available on eBay. For stems, I'd try Nitto, either the Technomic (7-shape, comes in multiple extensions, the "regular" one is longer than the more expensive "deluxe" version) or the Dirtdrop (MTB-style, but beautiful shape and finish, 80 mm extension only). See Rivbike.com to view/purchase either one. My own opinion is that it's harder to find a nice longer seatpost than a stem, because you're close to stuck with whatever diameter you need (can use a shim for undersize post), while stems have fewer variables.
The way you adjust the top tube length to suit you are: saddle fore-aft adjustment (somewhat variable, within a small range), stem extension (need to know which one you need and buy it), and handlebar design (where are your hands most of the time).
All that being said, it's arguably better to start with a bike frame that's close to fitting you; however, that's often not possible for the models you're talking about (3-speed "black bikes") because they didn't come in that many sizes to start with. There's probably a 21" or 23" frame out there, though, with your name on it in invisible ink -- you just have to find it!