Add assert statements for array resize operations