is this a trick question? one possible configuration is two stories, two in the front, two in the back, side entrances (for the back units at least). with reasonable height allowances, a lot that big could easily accommodate 20+ units.
I’ve seen duplexes on lots that size but you’re looking at a 4 story building (2 floors + 2 floors). And even then it’s tight.
https://urbanomnibus.net/2016/04/201604typecast-the-row-hous...
The buildings with more than 2 or 3 units tends to be on double or triple lots.
Sure I could see fitting 20 studios in a lot that size but SF needs a variety of housing. Housing for families, etc. Studios or even 1 beds won’t fit the need.