Array at (Loopindex("X")-1, Loopindex("Y")) = 0|4|9|12
is exactly the same as
Array at (Loopindex("X")-1, Loopindex("Y")) = 1
The "0|4|9|12" evaluates down to "1".
To do what you intended use system compare:
(Array.at(Loopindex("X")-1, Loopindex("Y"))=0)|(Array.at(Loopindex("X")-1, Loopindex("Y"))=4)|(Array.at(Loopindex("X")-1, Loopindex("Y"))=9)|(Array.at(Loopindex("X")-1, Loopindex("Y"))=12) = 1