O(n) The elemIndices function extends elemIndex,
by returning the indices of all elements equal to the query element,
in ascending order. This implementation uses memchr(3).
O(n) The elemIndices function extends elemIndex,
by returning the indices of all elements equal to the query element,
in ascending order. This implementation uses memchr(3).