ignoring the silly idea of PT 2x4 flat on roofing with no room for drainage (how are those attached without causing a leak?), for the railing, how about attaching the rail to a PT 3x or 4x ledger, that is bolted to the dbl 2x structure but with spacers to allow the drainage between dbl 2x and new ledger?
just an architect who has yet to be fired by our structural engineers...