It looks like you have it most of the way there. A few points:
* You can probably remove the "pick all" condition as they are all picked by default.
* I'm guessing GlobalStoneAmmout is the same as the Array width so your second event should look like this: "StoneSelection >= GlobalStoneAmmout" since arrays always go from 0 to array.width-1.
*Then just do set StoneSelection to array.width-1 when it's less than 0.