Gets the index at which the first occurrence of value is found