In this particular case, I'd leave the code as it is. Standard library algorithms are best used when you want to apply the same operation to all elements of the range. But here, you don't actually apply the same operation, as you assign a different number to each element's index. So a counter-based for loop seems to be the most natural solution here.
However, if you really want to use a standard algorithm, you can use a stateful functor:
struct Functor
{
size_t index;
Functor() : index(0) {}
void operator() (A &a) { a.index = index++; }
};
std::for_each(ManyAs.begin(), ManyAs.end(), Functor());