The NYC Administrative Codes that protect the courtyards are:
Code §19-132 Restrictions on First Place, Second Place, Third Place and Fourth Place in the borough of Brooklyn. The buildings to be erected upon the lots fronting upon First place, Second place, Third place and Fourth place in the borough of Brooklyn, shall be built on a line thirty-three feet five inches and a quarter of an inch back from the sides or lines of such places as they are now established by the map of the city, and the intervening space of land shall be used for courtyards only.
Code§19-136(b) Obstructions: It shall be unlawful for any person, directly or indirectly, to use any portion of a sidewalk or courtyard, established by law, between the building line and the curb line for the parking, storage, display or sale of motor vehicles.
Old Brooklyn Law creating the courtyards that is attached to deed of every property on the "Place" blocks.