Can I back some geoshape in a Workshop Map by functions?

I have a function that spits out specific geoshape (computed future shapes, like, for example, areas that will need attention from weather data, etc.).
This data dynamically changes quite often, and can be influenced by parameters from users.

Hence I want this to be dynamically computed, by a function.

How can this geoshape then be displayed on a map ? What if there is a lot of geoshapes ?