If you look at the ListView Controls package in the app store, I think you’ll find what you are after (https://appstore.home.mendix.com/link/app/105694/). There is a widget in that package called Drop Down Filter that does what you described. There are a number of other widgets you might find useful. Documentation for that package does a good job of describing how to configure the widgets.
Hope that helps,
Dynamically populating the options in a dropdown filter for list views is currently not there.
Perhaps you can create an idea, you’ll get my vote :-)