how to get array of children transform

C#
Transform[] children = GetComponentsInChildren<Transform>(); foreach (Transform child in transform){
 	// Do something to child 
 }
Source

Also in C#: