Overwrite array value only if key is string

If we supply an array in the "components" section of composer.json, and
if the array already exists in the target array, then the array value
should be appended to the existing array in order to add packages, shim
values, etc without manually copying the whole packages list.