@JamesJordan, @DanAllen , @DerekHunt1
I'm pretty late to the party, but maybe it still helps...
This sounds like a job for Python, not Arcade.
Open the Python window:
Edit this code, paste it in the Python window and execute it (make sure you don't have selections in the layers!).
geometry_layer_name = "name_of_the_layer_with_the_right_geometry"
attribute_layer_name = "name_of_the_layer_with_attributes_and_wrong_geometry"
common_field = "name_of_the_common_field"
# this will change the geometry of the second layer's underlying data, so back it up!
active_map = arcpy.mp.ArcGISProject("current").activeMap
geometry_layer = active_map.listLayers(geometry_layer_name)[0]
attribute_layer = active_map.listLayers(attribute_layer_name)[0]
# read the correct geometries and save them in a dictionary
# {common_field_value: shape}
cursor = arcpy.da.SearchCursor(geometry_layer, [common_field, "SHAPE@"])
shapes = dict([row for row in cursor])
# loop through the second layer and update the geometries
with arcpy.da.UpdateCursor(attribute_layer, [common_field, "SHAPE@"]) as cursor:
for row in cursor:
try:
new_shape = shapes[row[0]]
cursor.updateRow([row[0], new_shape])
except KeyError:
print("No new geometry found for feature with {} = {}".format(common_field, row[0]))
Have a great day!
Johannes