You cannot do that in MATLAB for symbolic limits.
For specific limit, n being a given positive integer, then you would not use symsum for this purpose. Instead,
n = a positive integer
syms a [1 n]
syms x [1 n]
y = sum(a.*x)
That is, you create vectors or arrays in which each entry is a scalar symbol. You then do vectorized operations, producing a vector or array of definite terms. You then sum() the definite terms.
symsum is not primarily for creating a sum of definite terms: symsum is primarily for trying to find closed formulas for indefinite or infinite summations.
Under no circumstances can you use a symbolic variable as an array index.