adding optional predicate capability to arrayIndexOf and arrayGetDistinctValues

allows the ability to use a predicate to find distinct values.  Good to use to do reduction with an arrayMap combo.

Also optional so that old functionality isn't broken.