Object index and linked objects

I have a really big problem here. I’ve made a project with a bunch of linked objects (collections from an external .blend file). I need the alpha pass of each one of these objects so I went for the object index method. BUT I realized that that method doesn’t work with linked objects.
So I used Make local menu to convert every collection into local objects. Now the problem is that I have constraints in every null and I can’t copy/paste them maintaining the animation.
I need just one of these things: to use the object index with the linked objects or to copy the constraints with the embeded animation.