better performance finding an index path inside the selected array