fixing min/max to return indices as well (given an arbitrary dimension)

Fixes #48 #69 
What is `noreadadd`?