Added in a toArray function for all data models that uses the registry t...

...o populate the array. Also takes in an array of scrub values as an optional parameter. Also included are unit tests for the toArray function