You are expected to use shared pointers in only two ways:
1) When you create a new object,
std::shared_ptr<something> ptr(new something);
2) When you copy a shared pointer to another.
std::shared_ptr<something> copy(ptr);
So, if you create an object in an array, it won't fit the shared pointer scheme.
If you want to save an object allocated using a shared pointer in a vector, then you've got to save its shared pointer:
std::vector<std::shared_ptr<something> > my_vector;
my_vector.push_back(new something);
When you clear your vector, all the pointers get cleared and thus objects that were only referenced by the vector get deleted:
my_vector.clear(); // do "delete something" as required
As a side note, you say "more efficient" in your question... Shared pointers are not more efficient and they are not unlikely to create more code in your software than you would otherwise think of.
One very important point in C++ are exceptions. Objects saved in smart pointers (unique_ptr works too in that case) will automatically get deleted on exceptions. This is very important. For example:
std::shared_ptr<something> ptr(new something);
...
if(this_is_true) throw std::logic_error("something's wrong");
...
In the code above, the pointer ptr automatically gets deleted before the throw returns. This is not what I would call more efficient, but much better in terms of cleanliness. If you call a function that can throw (i.e. another new for example) then it becomes very tedious to handle each call (i.e. you'd need to have a try/catch around every single call and the catch would have to delete the pointers and then rethrow.)
So in that sense, it is efficient. However, in terms of speed of execution, it is probably not any faster (or slower) than not using shared pointers.
shared_ptrs go, it gets destroyed.arrayorvectorofshared_ptrs.shared_ptrto know that you have a copy lying around in an array.