apply mapping for slices of structs