That said, there's really no reason to meddle with the Blizzard metatable. It's absolutely trivial to add methods to a frame, and you don't have to "replicate" anything; definte each method once, and just add a pointer to each frame as desired:
Code:
local function DoSomething(frame)
-- do something with the frame
end
for i = 1, 100000 do
_G["MyButton"..i].DoSomething = DoSomething
end
Obviously you don't (I hope) have 100000 buttons, but the principle is the same. It doesn't matter how many frames you attach the function to; only one copy of the function exists.