Fairly tangentially related, but I've written a tool which required me to solve some similar PE-related problems, available at:
https://github.com/akavel/rsrc. In it I produce ~"PE/COFF" "object" files (more precisely: .obj files containing .ico and .manifest resources in RSRC section, and/or some stuff in static data section), so in case you wanted to try emitting PE executables at some point, some things there could maybe help, or at least be of interest. But maybe you've already solved all of the same problems/doubts, so maybe no use here.
/Mateusz.