update set and get value by variable and array