code: func (v ElementBuildingVisitor) replaceListElement(meta apply.FieldMetaImpl, item *listItem) (*apply.ListElement, error) {
  	meta.Name = item.Name
  	result := &apply.ListElement{
  		FieldMetaImpl:   meta,
  		ListElementData: item.ListElementData,
  		Values:          []apply.Element{},
  	}
  
  	// Use the max length to iterate over the slices
  	for i := 0; i < max(len(item.GetRecordedList()), len(item.GetLocalList()), len(item.GetRemoteList())); i++ {
  
  		// Lookup the item from each list
  		data := apply.RawElementData{}
  		if recorded, recordedSet := boundsSafeLookup(i, item.GetRecordedList()); recordedSet {
  			data.SetRecorded(recorded)
  		}
  		if local, localSet := boundsSafeLookup(i, item.GetLocalList()); localSet {
  			data.SetLocal(local)
  		}
  		if remote, remoteSet := boundsSafeLookup(i, item.GetRemoteList()); remoteSet {
  			data.SetRemote(remote)
  		}
  
  		// Create the Item
  		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), data)
  		if err != nil {
  			return nil, err
  		}
  
  		// Build the element
  		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: // replaceListElement builds a new ListElement from a listItem
  // Uses the "replace" strategy and identify "same" elements across lists by their index