Add assert check for arrays