whichf function

which with arr.ind TRUE