i automated something similar in the past i guess
within a for-loop, what iterates through all elements a specific list has, i iterate through every field the listitem has. extracting information i need etc.

for example i use some fieldvalues and overwrite them with new values if needed

after im done, i just update the listitem with the activity below and all changes are getting updated in sharepoint immediately.

hope this helps