Is there a way to spawn new buttons in a widget during the game

So Im working on an RTS game, and im trying to set up a widget blueprint that will create a new tab for each npc that gets added to the game. For the time being, im just trying to set this up with buttons, but it has proved to be way more difficult than i thought. Im trying to just make an array that will find all actors of class NPC, then create a button for each one, as children of a vertical box. Ive got the first part down, but, that only seems to help me if i were actually getting or setting data from them, which i am not. I have been able to create one button , but i cant get it to work after the first one. The only way i can think of going about this is making a variable for each character, and since there does not seem to be any way to create variables during the game, does anybody have any ideas on how i can go about making this work?

Any update?
I’m working on a similar function right now.
My solution is to create another widget class, which has an only button, in a vertical box as a child.

It worked with mouse.
But new widget cannot work with gamepad because it’s not just a button but a widget.

I stopped working on this project almost a year ago, I never got it resolved, but made a workaround similar to what you did