If we are talking about feeders, there are some considerations.
If the attic or "common space" the feeder is installed in has no fire walls, it is generally permitted to install the feeders across those spaces. Again there may be local issues to deal with.
If one is penetrating fire walls, those fire walls are delineating separate buildings. Then it would be an issue.
1. running feeders through separate buildings as per the definition in Art 100 and a similar definition in most building codes.
2. If installing a feeder through the separate buildings is the only method available, then a disconnect is required. [225.31]