Your title doesn't really match what you're asking. It seems like you understand the idea of an exclusion array already.
It seems to me you want to know more about how to track references.
Two immediate options are:
A) Use an array that stays in scope, and at the point of code where all projectiles are created, append their reference to that array, and at their point of despawn you would then remove them.
B) If you just want to build the array every frame from children in a certain node you would do something like this:
var node = get_node("path goes here")
var exclusion_list = []
for child in node.get_children():
if(child.is_type("PhysicsBody2D")):
exclusion_list.append(child)
print(exclusion_list)
var result = space_state.intersect_ray(get_global_pos(), global.PLAYER_POS, exclusion_list)