Unable to perform the index and multiple match array function