add array flags for mat reading