Fix multi-value bug with show metadata ordering.

We can also use array_map here instead of building the array
imperatively.