There are a few different ways this can be done. Here's one :
_data = std::make_shared( new T[ size ]() );
I think that will work but it is hard to know for sure because the declaration of _data is not shown. You do not need to null it in your first case because that happens automatically. If your compiler does not support this specialization for arrays then enable C++17 capabilities.
Is there a reason you don't use a vector? This is exactly what it is for.