Let's say I have the array:
someArray = [["0","1","1","0"]
["0","1","0","1"]
["0","1","0","1"]
["0","1","1","0"]]
I would like to point out one element in the array and then be able to identify every similar "touching" element (touching meaning if the array was viewed as a grid, they would be connected through one or more connections). For example, in this case, if I chose someArray[0][0], it would give me [1][0],[2][0] and [3][0], because all of those elements are "0", and are "touching" one another. I only mean touching NESW, without the combinations of said directions.
What would I need to do to start working on this?
EDIT: This turned out to be simply "Flood Fill".
You might consider learning how to implement breadth-first searches and depth-first searches in order to accomplish your objective. The following example shows how both of these search strategies can be easily handled in one function. A modular approach should make the code simple to change.