Change to how derived values are updated

Should be more efficient, to write them all for one entry at a time
instead of repeated writes once for each element, for each entry.