>>38137105Depends on how much you want to interact with others and how willing you are to use injections. But speaking broadly: Luck, honestly. Ditto are available in Emerald's postgame, and Emerald's RNG is actually surprisingly easy to manipulate. I got my 6IV Ditto by sheer chance while going through Cerulean Cave back in HeartGold.
Any of the DS era games will let you use Action Replay and similar devices to force perfect IVs.
In the 3DS era, use the DexNav in ORAS to chain Ditto across the mirage islands--finding a Ditto with 3 guaranteed perfect IVs can make it easier on you as the game will only have to roll numbers for the other three stats.
Not sure if Ditto are available in the wild in Sun and Moon outside of that one sidequest in the Ultra versions, but the Ditto impersonating the townsfolk have adequate fixed IVs and natures.
Back when Wonder Trade was more active, most Ditto that one would receive would often be hack products with perfect IVs, and people should still have perfect Ditto available in the GTS I would imagine.
Loathe as I am to recommend it, your easiest, best bet nowadays would be to ask for gibbedats at other Pokemon forums where you're allowed to DM friend codes and shit.
Pic unrelated.