Off the top of my head I can only think of tracking down which function is the last point of updating the name fields of any Unit Frame and hook into it so that you can replace the name with your alternative... but some that I found returned straight out so not sure if they would follow on with your custom code.
For example:
https://www.townlong-yak.com/framexm.../UnitFrame.lua
Includes this function:
Lua Code:
function UnitFrame_Update (self, isParty)
if (self.name) then
local name;
if ( self.overrideName ) then
name = self.overrideName;
else
name = self.unit;
end
if (isParty) then
self.name:SetText(GetUnitName(name, true));
else
self.name:SetText(GetUnitName(name));
end
end
UnitFramePortrait_Update(self);
UnitFrameHealthBar_Update(self.healthbar, self.unit);
UnitFrameManaBar_Update(self.manabar, self.unit);
UnitFrame_UpdateThreatIndicator(self.threatIndicator, self.threatNumericIndicator);
UnitFrameHealPredictionBars_UpdateMax(self);
UnitFrameHealPredictionBars_Update(self);
UnitFrameManaCostPredictionBars_Update(self);
end
It might be as simple as hooking into this function and just adding your random name and setting the text again. If not, it gives you a starting point to investigate.