You are duplicating code here as in the `isArray!T` check above. Could you try and fold it all into the assign function like the following?:

```D
private void assign(T)(auto ref T arg)  // note the auto ref
{
...
else static if(isArray!T)  // will work for both static and dynamic arrays
}
```