In any district, a detached accessory building not exceeding twenty-four (24) feet or two (2) stories in height or, in any case, not higher than the main building, may occupy not more than thirty (30) percent of a rear yard. In District “R-2” through “M” inclusive, if such building is not more than one (1) story or sixteen (16) feet high, it may occupy forty (40) percent of the rear yard. No part of a detached accessory building may be connected with the main building [except] by a lightly constructed, covered passage, open on each side and not more than six (6) feet wide inside, the roof of which is not more than twelve (12) feet high at its highest point and is not an extension of the roof or main building.