added check for protected/hidden items in arrays