Attempt to write some basic functions to set DArrays as per issue #3307

I've done some brief tests and it seems to solve the issue with the setting of values in DArrays.  I'm sure there are better ways to do this, but this seems to work.