Right now I just need to fix an Out of Bounds error

Whenever I click a cube on the edge of the Array I get an Out of Bounds
error.