There isn't an In-Game way to get any of the 3 Pokemon. You'll have to Hack or Trade.
You can just Inject the 3 Pokemon into your Game. There is a chance that your Save File might corrupt so keep that risk in mind. The most easy way of hacking would be via Powersave or QR injecting
Although most Keldeos, Meloettas and Genesects are likely to be hacked you can still get a legitimate one as there were Events for all 3 in 2012 - 2013
Recieving a Hacked Pokemon via trade is a lot less risky than hacking into the game itself.