KT-4347 add indexOf function for Arrays

This is my first attempt at the PR, glad to hear feedback.