Use any calculator that can do programmatic operations like modulo.
Take PKHeX PID, convert to decimal, use % 100.
Rare forms need the result to be 0. If you want the rare form, then just subtract the result from the decimal PID, convert to hex, done.
Pick a new EC that has the result you want.