Added custom smart pointers to support arrays