tl;dr - is it possible without shortcuts? no: illegal.
There's a difference between abusing quirks (RNG) and causing normally unavailable quirks (glitch) and then abusing the glitch.
Glitches are not part of the intended game design, thus never legal (in the eyes of the official legality checker).
Corrupting memory to trigger an unavailable/custom encounter is not legal. Encounter must be available without glitches.
Corrupting memory to replace data on an existing pkm is not legal. Data replacement must be available without glitches.
Examples:
Semi-legit: Tweaking (glitch) to encounter the ingame Darkrai; no shortcuts were used during the current play session (soft reset after arriving), and the encounter is normally obtainable without shortcuts (event distribution).
Semi-legit: Hacking in the event item of a released event; again, no shortcuts were used during the current play session and the encounter is normally obtainable without shortcuts (event distribution).
Illegal: For the flute Arceus, encounter is only available via setup shortcuts.
Illegal: Encounter / setup is not available without glitches/cheats. Rage glitch, ACE, etc.
In the diagram posted by theSlayer, naturally and shortcuts are key words when determining legal/legit/illegal. Causing the game to behave unnaturally is not legal