Random wild battles

I noticed a few hacks seem to have this option, and I was wondering how it is done (hoping it is relatively simple). Is there a way to make wild Pokémon encounters totally random? Like, instead of the fixed table for this or that route, an equal chance for all 251 Pokémon to appear?