Waterfall-Style Field Injection Add-On?

Curious,

Is there an add-on that can inject existing media from a previous field across empty fields and automatically update the media injection based on new media?

To specify, imagine that the highlighted cards in the browser contains 3 pieces of Media, say images A,B,C.

Is there an add-on that exists so that it goes down or up each of these cards and injects the media from the previous card in the same field, updating the injection type whenever a new form of media is detected?

I think you can do this by

  1. exporting your deck as a csv,
  2. importing it into Excel/Google Sheets,
  3. sorting the rows to get the blank cells in the right place after the cells with the media file
  4. using a spreadsheet formula to copy the value from the cell above in every blank field
  5. selecting the media field column and copy-pasting it onto itself with values only (to remove the formulas)
  6. and finally exporting the csv back into Anki