Bash If Variable In Array Function