I am interested in using an STM32 to flash an sof or pof file onto a Cyclone IV FPGA. The sof/pof will be stored in SPI flash memory, and the plan is to use the STM32 as a programmer. I haven't been able to track down any projects that do this but am super keep to learn if and how it could be possible.
It's definitely possible; all major FPGAs are designed to be programmable through a serial port from an external controller.
I don't know whether you've already consulted the official documentation in this matter, in case you haven't:
What you want is the single device serial configuration, page 8.
The FPGA just works as SPI master and clocks the STM32's SPI FIFO; your job as firmware designer is too hook into the "FIFO half empty" interrupt and make sure the next amount of data is DMA'ed into the SPI FIFO.
ST has several examples that do that; not quite sure which one fits your application best.