I usually use either For Each + Break or Associative Arrays but there are many different methods where you can use functions a bit "incorrectly" such as Transform Each ("one-liner" such as this are usually horrible ideas (in my opinion) as they tend to be difficult to read)
Names Default To Here( 1 );
A = {1, 2, 3, 4, 5};
B = {3, 6, 7};
r = Eval(Transform Each({item}, A, Output("Expression", "Any"), Contains(B, item)));
It also depends on what you are comparing: strings, integers, floats, lists, ... as JMP lists can basically contain anything.
-Jarmo