code: func (v ElementBuildingVisitor) doMapList(meta apply.FieldMetaImpl, item *listItem) (*apply.ListElement, error) {
  	key := meta.GetFieldMergeKeys()
  	result := &apply.ListElement{
  		FieldMetaImpl: apply.FieldMetaImpl{
  			MergeType: apply.MergeStrategy,
  			MergeKeys: key,
  			Name:      item.Name,
  		},
  		ListElementData: item.ListElementData,
  		Values:          []apply.Element{},
  	}
  
  	// Use locally defined order, then add remote, then add recorded.
  	orderedKeys := &apply.CombinedMapSlice{}
  
  	// Locally defined items come first and retain their order
  	// as defined locally
  	for _, l := range item.GetLocalList() {
  		orderedKeys.UpsertLocal(key, l)
  	}
  	// Mixin remote values, adding any that are not present locally
  	for _, l := range item.GetRemoteList() {
  		orderedKeys.UpsertRemote(key, l)
  	}
  	// Mixin recorded values, adding any that are not present locally
  	// or remotely
  	for _, l := range item.GetRecordedList() {
  		orderedKeys.UpsertRecorded(key, l)
  	}
  
  	for i, l := range orderedKeys.Items {
  		var s proto.Schema
  		if item.Array != nil && item.Array.SubType != nil {
  			s = item.Array.SubType
  		}
  		subitem, err := v.getItem(s, fmt.Sprintf("%d", i), l.RawElementData)
  		if err != nil {
  			return nil, err
  		}
  
  		// Build the element fully
  		newelem, err := subitem.CreateElement(v)
  		if err != nil {
  			return nil, err
  		}
  
  		// Append the element to the list
  		result.Values = append(result.Values, newelem)
  	}
  
  	return result, nil
  }
docs: // doMapList merges 3 lists of maps together by collating their values.
  // tries to retain ordering