This is a glitch from Red/Blue/Yellow where people go through a series of events to multipy any item so as to have 99 of them. I am not going to tell you as I don't approve of cheating. It is also a good way to mess up your game. Here are some ways to get more Rare Candies cleanly.
The two best ways after you have found them all on the map is Pickup and having a Shuckle holding a Berry Juice until it becomes a Rare Candy. If you want the locations of Rare Candies in HG/SS, look at the first question on the related questions section to the right of the page.
Edit: Swampert is right. Also Action Replay can do this.