Update by GoldenHelmet
Iron golems can spawn on or inside a wide range of non-solid blocks as long as there is a solid block underneath.
- On a flat surface made of solid blocks, place 20 beds, and 10 workstations, and spawn 10 villagers.
- Within the 4 block space above the solid block floor, place all manner of non-solid blocks such as lower slabs, string, glass panes, iron bars, cauldrons, signs, banners, etc.
Iron golems spawn only on solid-top blocks with empty space above, like other mobs.
Iron golems spawn on or in non-full blocks as long as there is a solid block below within their spawning range.
I have only seen this happen once so far, but i know this should not happen to begin with, I slabed the underneath of my iron farm in bedrock edition to keep golems and mobs out of there only to find one spawn in ignoring the slabs and suffocating in a 2 high area eventually dying.