look up the part number, and you can often find them from the electronics distributors, onlinecomponents and the like. MX lock, superblack, and the Cherry Japan "hirose" switches are all somewhat uncommon in the 'states.
But since you didnt mention cherry specific switches in your thread title, let;s discuss some of the non-cherry MX switches taht are "rare" and how to find them.
Honeywell hall effect: these aren't really rare, but it seems like no-one has a knack for finding them. I recommend looking at the spacebar (the sealed switches can have a "bent" spacebar, whereas you have to use other methods to determine if the "dual magnet" type is HE or not), font, keycap shape, etc. Some variants are quite rare, with examples only being known from a single keyboard (clicky hall effect).
OKI gourd spring: these appear in Japanese keyboards, or Keyboards made by Japanese companies. The best option is to talk to your friends in japan, where they aren't quite so rare.
First Generation Leaf Springs. I only know of them from the Sanyo MBC1000 keyboard, and I've only seen two on eBay. Other than age, it's sometimes hard to tell exactly what generation of leaf spring is there. I recommend checking for thick sphericals and getting lucky.
---
Unfortunately, a lot of the rarer switches are hard to find as they aren't made anymore. Get familiar with vintage keyboards and switches, and you may get lucky on eBay, an e-cycler's website, or even locally!
cherry mx lock is rare. VERY rare.
Can't be that rare: there have been several group buys for them on this forum alone. They're just expensive.