A better match()

matchval(query, from, to = seq_along(from), nomatch = NA, ...)