A simple Mathematica / Wolfram Language package of functions that return lists of positions for use in MapAt etc
Download the .nb file and open in Mathematica to read implementation details.
Download the .m file and install to use as a Mathematica package.
Following some last minute changes IndicesArray has not been tested on arrays greater than 2, so may not return the correct result.