This stream will yield every distinct value only once. Note that
internally, it uses in_array for lookups. This is problematic for large
numbers of distinct elements, as the complexity of this stream filter
becomes O(n * m) with n the number of elements and m the number of distinct
values.
This mapping preserves key => value relationships, and will yield the
values with the first keys encountered.