Yes, there is forward declaration. You could write class Array; to tell that word Array is a name of a type.
However, on line 13 the compiler has to reserve memory for "arr". How many bytes does an Array require? The definition (lines 17--22) tells that and therefore it has to be before the point of use.