A non-recursive, n-dimensional implementation of flood fill.