refactor(indexOf) use Array.prototype.indexOf exclusively

Replace helper functions with the native ES5 method

Closes #8847