Here is an abuse of the range assignment to find the first element of an array that matches the pattern$. But a loop would be more readable and more efficient I guess.
def fn_find(array${all}, pattern$)
local idx = 1
array${all} = tbl(ior(array${all} like pattern$, and(0, ++idx)), array${all}, err=*next)
if not(tcb(2)) return dim(read min(array$)) - 1
return idx
end def
!
dim arr$[*]
arr$[*] = "alpha"; arr$[*] = "beta"
arr$[*] = "gamma"; arr$[*] = "delta"
!
idx = fn_find(arr${all}, "^.am.a$")
if idx print msg(="Entry that matches ""%3"" at index %1: %2", str(idx), arr$[idx], pattern$)