Your whole approach is wrong. You have 4 different objects - espacio1-espacio4. It needs to be just one espacio object with 4 instances (copies).
The same with CARTA1-CARTA4 - it needs to be a single sprite CARTA with 4 instances. You can use multiple animations in the sprite for your cards.
.
Once you make these changes, you will be able to run a loop like this:
For Each Espacio order by random(1)
.. Pick unassigned card and move it to espacio