It's because you define the variable anArray in the header file. When its included in two translation units it's defined twice, giving you the duplicate symbol error.
Just declare it in the header file
extern int anMyArray[9];
and define it in one (and only one) source file.