Calculate unique items outside a repeat

This feels closely related to Add distinct function for use with entities and the goal would be to serve both needs in the same way. Maybe you could briefly describe your use case in that thread?