It turns out my suggestion was already covered by std::unique_ptr<T[]>.
(I imagine that my idea could have lower overheads, but that's possibly
just because I haven't thought through the details for more complex
cases. And std::unique_ptr<T[]> has the big advantage of already
existing - a few extra bytes overhead is unlikely to be significant in
real code.)