Fix constness of array.d

Thanks to @aG0aep6G this works as far as I can see.
I believe there are different views about this. Do @MartinNowak @Dicebot @yebblies @JakobOvrum agree on this?