Revert "Revert "Template for dynamic array""

This reverts commit 8c1f53ab6623a0e03a2131d11e2db25976fa8127.