Copy constructor to prevent implicit destruction of shared array memory address in output function