elemIndices package:ListLike

Returns the indices of the matching elements. See also findIndices