Revert "Revert "Revert "Template for dynamic array"""

This reverts commit 81171c8763dd4560b330e26bfeae9082abec4c13.