if you don't know, the function OnBodyEntered
gives you the body that entered, so you can tell it to set position of the body, so you type:
var position = Vector2.ZERO
if body.name == the name of the body:
position = body.global_position
and if you want to get several positions without creating a lot of variables, you can create an array:
var positions = []
if body.name == the name of the body:
positions.append(body.global_position)