Leverage array.index instead of looping through