Template for dynamic array

Template for dynamic array