How do I make a custom JavaScript dropdown in custom blocks?

It definitely won't be very easy, because fetching a URL in JavaScript is asynchronous, and menus are not. But you'd do something like this:

function () {
var obj = {};
JSON.parse(awaitAsync(fetch(world.children[0].
globalVariables.getVar('server')+'cvs/'+cloudid+'/?us\
er='+world.children[0].cloud.username))).forEach(e => {
obj[e] = e;})
return obj;
}

(Replacing the awaitAsync function with however you would make it synchronous)
Since the process can be delayed by slow internet and such, it's not a very good idea, as if the fetch() function freezes, the project will crash. (Input slots try and calculate their menus instantaneously.)
Of course, this method is untested because of the async problem.