I want to update a 50-dim variable list. For each element in this list, I want ith element in this list only to be updated when data with flag i is given. For example [1,2,4