throw on write generic object[] and anti reference loop added.