Re: Grounding for second structures
I'm not sure why this is posted in AFCI forum. The answer depends on wether or not there is any metallic pathways that exist between the two buildings? This can be a water line, gas line phone line, TV coax and or even a switched circuit for outdoor lighting. If any one of these exist then there must be 4-wire (G/N/H/H) ran to this sub-panel and the grounds and neutrals must be kept separate at the sub-panel. you do not bond the neutral. and grounds and neutrals must go on there own buss bars, the neutral bar has to be isolated from the sub-panel can. And a grounding electrode must be installed at the sub-panel.
If you don't have any metallic paths between the two buildings then there is an exception to this rule that you can run 3 conductors (N/H/H) but then the neutral has to be bonded at the sub-panel. Still a grounding electrode is required ether way. Although this is not the preferred way as someone can in the future add a gas line or a phone line. then the danger of a parallel neutral would exist. But the code is not for the future so the judgment call will be up to you as to which way. A separate grounding conductor is the safe way to go.
I hope this is what you were asking. and was of some help.