A value can occur more than once in a dictionary but not in a set. So returning an array returns all the values, while returning a set would return only the unique values.
Keys of course must be unique, so I'd suggest the choice of array rather than set is simple consistency.