added function getUniqueValuesArray to get an array of distinct values from a field in a given data array