[Godot Mono C#]

In my code I have:
var rays = GetTree().GetNodesInGroup("pacmanRays");
It gets a bunch of RayCast2D nodes in my pacmanRays group and stores it as a godot array in rays.

How do I convert that godot rays array into a Raycast2D[] array?