KT-4347 add Array extension indexOf to stdlib

My second try, this time using the code generators.

I also included a simple test, which passed when I ran 'mvn install' for libraries

I hope I have done it right this time.