When I visit the parts search website
www.octopart.com , and when I type "2222A" into its search box, octopart returns some surface mount transistors in the SOT-323 package and others in the SOT-23 package. MouserUSA has > 200K of them in stock and on the shelf, ready to dispatch.
Similarly, when I visit mouser.com and surf to their Discrete Semiconductors -> Transistors -> Bipolar Transistors chart, and then type "3906" into the "Search within results" box, I get lots of different options in surface mount packages. MouserUSA has > 1.6 million of them in stock and on the shelf, ready to dispatch.
A quick comparison of the surface mount transistor's datasheet, versus the thru hole transistor's datasheet, confirms or refutes the hypothesis that they are interchangeable (except for power dissipation!).
_