Finds an element in a 2D array