This is not currently possible with Functions, as they require you to request a specific tag for performance reasons. Can you describe more about your use case? You might consider user-configured tags with input query variables, or use of metafields instead.
The use case could be an app that manages various types of discounts by applying tags to a product.
Tags contain an identifying prefix (common for all discounts) and a series of information related to the discount (for example the type of discount and the value of the discount), something like "promo:2:value:10" or "promo:20:value:7". Receiving all the tags that start with promo would allow me to have the list of discounts to apply. The same result can be achieved receiving the complete list of tags and filtering all tags with a certain prefix.
Do you have any suggestions for solving this problem using tags?