How can I find the indices of ALL the elements in all the eight directions (left, right, up, down, left-upper, right-upper, left-lower, right-lower) of a given 2D Matrix/Arr