each button is an "object" so yes you can dynamically add or remove as many buttons as needed
for i = 0 , reaper.CountTracks(0)-1 do
Button:new(... parameters for each button...)
end
the example in FR: A way to mark audio files during recording
is a good example
http://forum.cockos.com/showthread.php?t=175925