Stepping through this a step at a time...
In the event command you do this.
Which goes to the Game_Interpreter line 531. Which calls game_data_operand at line 552
In the case of above where you're setting the x position the return value is character.x
character being the actor it gets from line 216. Which is either $game_player or and event.
So that would lead me to think the script command is
$game_variables[6] = $game_player.x
tested and works.
So to have them together in an array, as you know is
$game_variables[6] = [$game_player.x, $game_player.y]