This is really dependent on HOW you want it to be infinite.
For the wild Pokémon
- A Exeggutor (Alolan is fine) with ability Harvest with skill swap
- Switch out a mon with Trick holding a Leppa Berry
- Use trick and POOF a infinite chain.
The wild mon would use the leppa berry and harvest will refresh it as long as you don't some how kill it
For your self
- Use the poke palego for ONLY Leppa Berries
-Harvest them all!
-Get a mon with substitute and false swipe (Pro tip get one that might have immunity YOU NEED THIS FOR BELDUM)
-Substitute or False swipe first (then whatever second)
-Keep in mind what moves it has and how much PP (If its like Tackle and some other moves you would be fine for some time)
-When you feel as if the PP on the wild mon will run out wait for a SOS call and faint it.
-Repeat the same on the other mon and get a shiny
THIS METHOD CAN ALSO BE USED FOR EXP ON THE CHANSEY (I also got shiny blissy and chansey because of this)