Checking State of LED inside an array?

Yeah this was just pseudo code..