Ya this is why I mentioned on the mewnbase post that putting the whole game into an array could become pretty complex, it's possible though. Also have you thought of using letters or words instead of numbers in the array? Might be easier to see things but of course you know what the numbers refer to so maybe it's fine.
Depending on how the power works you could run something like, when you right click to remove a connecting tile, get its X and run everything across that x-1 looking for green tiles and set them to red. Then also go for x+1 until you stop finding a green tile and set them to red as you go. But then again I don't know how the power sources work really, if you remove a middle one but it can still be powered from the right by another generator then that won't work as they would remain green. You'll have to come up with something that you want in relation to the proper game design.