Function name sounds inappropriate.
"wander" usually means go to the random direction.
Better be "searchArrayPath" or simething like that.