The iterators in Lua aren't exactly slow, and you are most likely not calling them all the time anyway. You can ofc. use a global, it's all up to you really
.
oUF.objects - Contains every frame touched by oUF.
oUF.units - Contains all the units that oUF knows about. The list is created by watching what gets sent to :SetAttribute('unit', ...).
oUF.elements - Doesn't exist. You might be thinking of the __elements table that exists on oUF objets however. This table just contains all the active elements on a frame.