Recover Pokémon Held Items from Events
I was just about to move all my pokémon to my pokebank and start my game over to work on my living national dex when a harrowing thought came to me. What about the unique hold items that come from special events?
Since hold items can't be transferred to pokebank, is there any way to get those items back (or again) if you're pulling those legendary Pokémon out of pokebank rather than from an official event? Namely, the two items that made me think of this were Marshadium Z and Pikashunium Z in the Sun and Moon games, but the concept applies to X and Y as well as ORAS.
Solution 1:
You can still do a trade between games, and give this item to a Pokemon you are trading. You are not able to do this on one 3DS unfortunately.
Solution 2:
Mathias's answer is correct, but I'd like to point out that for the cases you specified - Marshanium-Z and Pikashunium-Z - the event was a distribution of both a Pokémon and a Z-Crystal, not a Pokémon that was holding a Z-Crystal.
If you traded a Pikashunium-Z to somebody, it would vanish from the Pokémon that's holding it if the receiver doesn't have a Pikashunium-Z of their own in their bag.