Button menu with dynamic JScript-generated content: still impossible?

If I save a list of items in a Lister var (e.g., closed tabs), can I create a menu that on click would read that list and display it as its items, and then get back the index of the item a user selects (e.g., reopen this path as a tab in a position dependend on the currently opened tabs)?

Then you could add this button to the tab context menu and be able to undo more than 1 tab close operation.

Found a few old threads on the topic, though this one is about dynamic buttons, not a content of a menu, saying it's not possible

Is this still the case?

Or is it only possible to do via a new dialog?

Scripts can pop-up their own menus and react to the selection.

There isn't a way for scripts to dynamically insert items into general Opus toolbars/menus.