Reduce reliance on promotion operations via container typing (#37088)
While building Julia, we have a *lot* of calls to promote, often
with abstract types. This short-circuits most of these by declaring
the container type at the outset.
This has one user-visible outcome, improved inference for `walkdir`.