Performance is harder than just distribution. For example, you can cause the extra cache line to be in the cache with a static variable, because it does not touch the other local memory that you are using, and increase the pressure in the cache, skipping the cache, etc. Compared to this value, I would say that the incredibly tiny overhead of redistributing the array in the stack would be very trivial every time. Not only that, but any compiler is great for optimizing such things, while it can't do anything about static variables.
In any case, I would suggest that the difference in performance between them is minimal - even for a closed loop.
Finally, you can also use foo_2 () - the compiler perfectly has the right to make such a variable as static in it. Since it was originally defined as const, const_casting, const const is an undefined behavior, regardless of whether it is static. However, it cannot select a static constant, not a static one, since you could depend on the ability to return its address, for example.
Puppy source share