how to add childern of an object to an arry code example
Example 1: unity array of child objects
Transform[] children = GetComponentsInChildren<Transform>();
Example 2: how to get array of children transform
foreach (Transform child in transform){
// Do something to child
}