delete -> delete[] for arrays
added multi index object array support
fix to use any size for arrays, also use constant