There are a couple different systems that are used for the greeting panel and which one pops up depends on the NPC's implementation. GossipFrame specifically uses the new dataprovider-sourced scrollbox, which is more abstract and a pain to follow than previously.
This might do the trick though.
for _,frame in GossipFrame.GreetingPanel.ScrollBox:EnumerateFrames() do
Note: Despite employing frame pools, it doesn't implement FramePoolMixin
Not all ScrollBoxes will have :EnumerateFrames()
either. It's an exclusive method of ScrollBoxListMixin
. However the equivalent could be achieved with the other types by using ipairs(ScrollBox:GetFrames())