Version 3 looks best. Now, after checking, I see that fieldnames returns a tuple and not an array, which means that allocations isn’t necessarily a problem here.
But, as I mentioned, it’s not a trade-off the way you were thinking. Either the allocations don’t matter, so you can create an intermediate without cost, or the allocations do matter, in which case you should create an intermediate variable if you are using it repeatedly.
There are cases where not creating an intermediate can be beneficial, but that is if you can work directly on the original object and avoid allocation completely. But this is unrelated to whether you assign a name to it or not.