We have also had to check the type of the array being accessed such that we can copy accross the correct type to he resultant `ArrayIndexInstruction`:
```
/* Array type `
if(cast(Pointer)indexToType)
{
gprintln("ArrayIndex: Pointer access");
Pointer pointer = cast(Pointer)indexToType;
accessType = pointer.getReferredType();
}
/* Stack-array type `
else if(cast(StackArray)indexToType)
{
gprintln("ArrayIndex: Stack-array access");
// TODO: Set `accessType` here
}
else
{
// TODO: Throw an error here
// throw new TypeMismatchException()
gprintln("Indexing to an entity other than a stack array or pointer!", DebugType.ERROR);
assert(false);
}
```