Well, the trainer comes in handy for generating most codes (stat EXP codes, item codes, etc.)
Some of the wierder codes are obtained by people running the game under an emulator and watching the RAM change that way.
If you want a purely maxed monster (maxing level and Stat EXP normally are a matter of constantly fighting), you also "need" perfect genes. The genes are determined when you catch a monster, and the odds of one being perfect is 1/65536. This means that a whole team of them is like screaming "yup, I'm used shark to save years of game time", though it is certainly possible (it isn't as if you gave spore to Electrode).
The maxed gene codes are:
Most of the codes given out in this string are for Red or Blue (strangely, it looks as if the Mew code you were given is for Yellow). Yellow codes differ by a single byte in the address. Notably, all the variables are located in one position less than they used to be. So to find the max gene codes for yellow (for instance)
(1) Get the address= D186
(2) Subtract 1=D185
(3) Rewrite code = 01FF85D1
The other code is 01FF86D1
Note that 01XXF0D1 would become 01XXEFD1
D1F0 - 1 = D1EF
(if confused, use your windows calculator in Hex mode, or look through posts in this section to find a better thing on hex).
The Old Red/Blue fight any monster code is:
However, J.Donald found a much better one:
With these codes, you can fight *any* where. Basically, you get set up for a fight, put the switch on, then turn it off. You should already be being drawn into a fight.
The codes to fight a L100 Mew:
(The "64" is hex for 100, change to whatever level you want to fight).
Then use the Stat EXP codes, gene codes, etc., if you want.
Remember not to leave the GS switch on until *after* the game is loaded.