Add freeScopArray function

Free pet_array in current ppcg_scop.