Change Picture ID / Priority

Is there any way to change the Picture ID? Im making a card game, and cards are discarded into the center, i'd like the last card to be on top of the discard pile every time.
The problem is i assign ID 1-7 for player 1, 8-14 for player 2, 15-21 for player 3, 22-28 for player 4.. So when Player 1 throws a card in the pile, it automatically goes to the bottom, because it has a lower picture ID
The pictures are stored in the _pictures array in $gameScreen, and the ID is just the array element the picture is at.

To do this, I would find the highest element in the array that has a Game_Picture in it (x), set the x+1th element of the array to be equal to the card thrown on the pile, and set the x one to "undefined" to avoid duplicating it.
thanks i tried that duplicating, but it messes up the rotate animation i have. i could set an invisible pile cards, but it gets difficult since the first turn is selected at random every time.
if there was only a way to inherit the properties of one picture to another.. like the first thrown card is ID 24, then it can be inherited instantly by another picture with ID 31.. and so on so
24 : 31
25 : 32
26 : 33
27 : 34
28 : 35
1 : 36 <--- back to start
You need to use the same "Array" logic.

Example:
Player1 = 4,13,17,18,22,20,1
Picture 4 show face card 18
Player2 = 27,2,16,10,26,19,5
Player3 = 11,3,15,28,14,23,7
Picture 19 show face card 14
Player4 = 25,24,21,6,9,8,12

Picture 1 return card4

Trading -> Player 1 send Card pos 4 to Player 3
Trading -> Player 3 send Card pos 5to Player 1

After:
Player1 = 4,13,17,14,22,20,1
Picture 4 show face card 14
Player3 = 11,3,15,28,18,23,7
Picture 19 show face card 18
Player4 = 25,24,21,6,9,8,12

Original thread: https://forums.rpgmakerweb.com/threads/change-picture-id-priority.136382/