Get the 8 closest neighbors of a cell in a 2d grid when flattened to a 1d array
github.com/phugh/grid-neighbors-1d
phugh/grid-neighbors-1d