Hi:
You stated this assumption/desire:
whenever i change something in the array it should reflect in the data set
However, your array definitions are _temporary_ and if you consult the documentation, you will find in this example:
http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000739642.htm
the explanation that:
"Although they behave like variables, temporary array elements do not have names, and they do not appear in the output data set." Full documentation on _TEMPORARY_ is here:
http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000201956.htm
As shown in this example:
http://support.sas.com/kb/24/773.html
if you want to "touch" the permanent dataset variables, you must use what is in the temporary array to explicitly change the values of the dataset variables you want to change/keep.
This is a good introductory paper on using ARRAYs with SAS (although, I find the documentation to be quite thorough and comprehensive, as well).
http://support.sas.com/rnd/papers/sgf07/arrays1780.pdf
Studying a bit more on arrays and how they work in SAS should help you come to a resolution of your issue.
cynthia