Array.indexOf/lastIndexOf implementation

This is an implementation of indexOf/lastIndexOf for Array for the my upcoming Haxe branch with cross-platform implementations.