I don't really know much about arena, but after taking a look at
FrameXML/Blizzard_ArenaUI.lua for the first time, I would guess that a crude answer is maybe something like this?
Lua Code:
for i=1,5 do
local frame = _G["ArenaEnemyFrame"..i]
frame:HookScript("OnEvent", function(__, event, arg1)
if arg1 == frame.unit and event == "UNIT_NAME_UPDATE" then
frame.name:SetText(i)
end
end)
end
Again, I know nothing about arena so I could be totally off.