Since data is an out-parameter (you're trying to populate it within genRand and make the result available in the caller, right?), you need to take it by reference:
template<typename T>
void genRand(T& data, int size)
{
...
genRand(smallVector, smallSize);
genRand(smallArray, smallSize);
(although you don't actually need to pass size in this case anymore:
http://coliru.stacked-crooked.com/a/b47b6b14ca97ea8d[
^])
Alternatively, you could use classic C++98 iterator interface:
template<typename Iter>
void genRand(Iter beg, Iter end, int size)
{
...
genRand(smallVector.begin(), smallVector.end(), smallSize);
genRand(smallArray, smallArray + smallSize, smallSize);
(that also makes size an unnecessary parameter, it is simply end - beg)
What happened in your case was that you passed a pointer to the vector, so T was deduced to a pointer to a vector, data[i] evaluated to a vector, and since vector has no operator= that takes an int, you saw the error message.