Get all neighbors of cell in array without out of bounds exception