Using structured arrays for data saving