adjusted the shared kbn.top_field_values() function to preserve field values, specifically so that arrays are not flattened to strings