Further cleaned up the handling of 'array' properties. Should really take the time and write tests. This is getting quite sophisticated ans subtle.