You should not expect to find information of this sort in building codes, etc. Engineering is not all formulas and numbers, it is art as well.
A socketed handrail connection can work, depending on the ability of the concrete to resist the moment. But 3" from a slab edge sounds too close. A bolted end plate connection would be more common, with the bolts in tension set back from the edge far enough not to fail the slab.