expr evaluating to 0 are "false" so array_indexof returning 0 fails

man expr says: Exit status is 0 if EXPRESSION is neither null nor 0, 1
if EXPRESSION is null or 0, 2 if EXPRESSION is syntactically invalid,
and 3 if an error occurred.

Chaning expr to use POSIX arithmetic $((..)) and assigning to a
variable instead.

Added test for array_indexof which returns index 0.