Storing component of instance in an array

I’m trying to store the scripts from several different instances of the base class “AeroplaneControls” within an array. So that I can later use this array to quicker access all the different methods contained in the subclasses. However when I do this I get the following error “Object reference not set to an instance of an object”

 GameObject[] Vehicles;
 AeroplaneControls[] Controls;
 
 Vehicles = GameObject.FindGameObjectsWithTag ("Vehicle");
 Controls = new AeroplaneControls[Vehicles.Length];
 for(int i = 0; i < Vehicles.Length; i++){
      Controls _= Vehicles*.GetComponent<AeroplaneControls> ();*_

}
It is not refeering to my gameObject “Vehicles” since I can do other stuff with it like find it’s position, so the problem is with my “AeroplaneControls” script array.

Edit: brain fart…

Your loop is likely failing after it processes all the items due to an incorrect loop limit.

This code:

for(int i = 0; i < Vehicles.Length; i++) {
    Controls _= Vehicles*.GetComponent<AeroplaneControls> ();*_

}
…should probably be (note the - 1):
for(int i = 0; i < Vehicles.Length - 1; i++) {
Controls = Vehicles*.GetComponent ();*
}
Array indices start with 0, so if you iterate while i < Vehicles.Length the loop will run 1 time too many (0, 1, 2, 3, … 20 = 21 iterations)