update isArray method and add equalArray method