Yes, it will find not just immediate children but descendents at any depth in the hierarchy.
Please read about how to post code in these forums .
The declaration of infi is not quite right. You don’t need to allocate a 96-element array when you are going to just replace it in the Start method. It should be just:
Inputfield[] infi;
The errors indicate a couple of things. First, because you’re seeing it twice, it means you have this script twice (at least) in your scene hierarchy somewhere. Second, because you’re getting an IndexOutOfRange exception trying to access element 0, then wherever this script is, it doesn’t actually have an InputFields under it.
That’s a very indirect way of checking your assumptions though. Better to use Debug.Log to check them directly:
void Start()
{
infi = GetComponentsInChildren<InputField>();
Debug.Log($"Found {infi.Length} InputFields under {gameObject.name}", gameObject);
}
Now run that and see what you find. Click on the message in the Console, and it will take you right to the object that’s running that script in the Hierarchy.