Filling array with children of multiple undefined gameobjects?

Hi!
So I want to find all available transforms on a buttonpress, and put them in an array to randomise a spawning point.
187141-capture.png

I want to make a spawning randomiser of a pipelines, but I need the transforms of those children.
Since it’s not one GameObject I can’t say ‘FindComponentInChildren’ or anything alike. All the children have tags to their name accordingly, so I can define when instantiating an object where it instantiated.
here’s my code:

  GameObject[] HasTopTrans;
  GameObject[] HasBottomTrans;
  GameObject[] HasRightTrans;
  GameObject[] HasLeftTrans;
  public GameObject[] Arrrr;
  
  

  public void OnClick()
  {
	  //This would work, if the objects weren't children. It just collects all the transforms and puts 
      //them in one array. I'm using "using System.Linq" too.
	  HasTopTrans = GameObject.FindGameObjectsWithTag("Up");
	  HasBottomTrans = GameObject.FindGameObjectsWithTag("Down");
	  HasRightTrans = GameObject.FindGameObjectsWithTag("Right");
	  HasLeftTrans = GameObject.FindGameObjectsWithTag("Left"); 
	  Arrrr = HasTopTrans.Concat(HasBottomTrans).ToArray();
	  Arrrr = Arrrr.Concat(HasRightTrans).ToArray();
	  Arrrr = Arrrr.Concat(HasLeftTrans).ToArray();

  }

Supposing that the tranforms that you want to use belong to the objects “Up”, “Down”, “Left” or “Right”, you could try something different:

    Transform[] childTransforms;
    Transform chosenTransform;

    private void Start()
    {
        childTransforms = new Transform[transform.childCount];
    }

    public void OnClick()
    {
        for (int x = 0, i = transform.childCount; x < i; x++)
            childTransforms[x] = transform.GetChild(x);

        chosenTransform = childTransforms[Random.Range(0, childTransforms.Length)];
    }

Then, all you have to do is to use the variable chosenTransform wherever you want.