Getting that many Rare Candies requires cheating; there's no normal way to accumulate 999 of them. You could use a cheat code, though I don't have the specific one handy.
Honestly, I don't use Rare Candies much anyway. A Pokémon that levels up from a Rare Candy only gains about half the stat growth it would from regular training, and in my view it takes some of the fun out of raising your team.