To your points, most brownstones in, say, Park Slope, do have bins in their yard, and the trash collectors remove waste from that bin. This is at least marginal rat resistance. Midrise buildings that are further out than that will have room for dumpsters if they are required.
(Multi-family apartment buildings are a form of commercial real estate, though they are neither office nor retail.)
I live in a neighbourhood not too far from park slope. You have to put your trash on the curb no matter what you live in and where in the city you live. Garbage men dont even want to pick up the trash that falls from then while picking up trash from the curb so I find it incredulous that they enter your yard and take it from a bin.
"Place your items curbside on the curb between 4 PM and midnight the evening before your scheduled pickup".
What proposal do you have in mind for the city to solve this?