Add ToSlice function to retrieve the members of the set as a slice