The parameter name to emitPackExpansionElementMetadata matched the
preexisting local variable name. Change it to something meaningful to
callers. Use a separate commit to make the original extraction more
obviously just an extraction.
The function emits the metadata for the element of a pack expansion at a
specified index. It was previously defined inline in the loop--defined
in emitPackExpansionType--which populates a new metadata array with
elements derived from a preexisting array. It will be used to emit a
single element in the case that only one is needed.