Array matching

Array matching using condition operators rather than nested loops.
Tough!