Renamed *ModeArray to ModeAray, fixed bug in AddArrayMode malloc vs realloc