How can I iterate over all cells of a table in a show rule?

You were pretty close ;)

The table.cell values can be accessed via table.fields().children

Just try this and look at the output:

#table(
  columns: (auto, auto, 1fr, auto, auto),
  align: horizon,
  table.header(repeat: true,)[Head 1][Head 2][Head 3][Head 4][Head 5],
)[1][2][3][4][5].fields().children

There are a few examples on this forum, like Is it possible to have a function in set rule that are inside a show rule? - #16 by bluss

For your case, probably something like this:

#show table: it => {
  // Prevent infinite recursion
  if (it.has("label") and it.label == <table-style-done>) {
    it
  } else {
    let fields = it.fields()
    let children = fields.remove("children")
    let new-children = ()

    for child in children {
      if child.func() == table.cell {
        // Table cell
        new-children.push([_Modified_ #child])
      } else {
        // Table headers (array)
        new-children.push(child)
      }
    }
    // Recreate and return the table
    [#table(..fields, ..new-children)<table-style-done>]
  }
}