Finished arrayHasOwnIndex function