Reduce the number of roundtrips for DistArray.get_localshapes to zero.

This also adds functions to metadata utils that could be useful for local map construction. But that can wait for another PR.
On that note, since these no longer require communication, should we drop the `get_` prefixes?