Help populating dropdown in settings dialog

Hi

I have started to tinker with the Roon API and now I got a problem I cannot figure out how to solve(I am also a javascript newbie)

I have copied a “makelayout(settings)” function from another extension where there is used a dropdown box. It works fine with static entries. Is there any way to populate such a dropdown dynamically? or from an array/object?

I haven’t found any extensions that do that?