New backend can't support argmin and argmax. Rewrite them to remove sturctured arrays.