Make array CTFE-able

also improve arrayAllocImpl, and bugfix + unittest