If I want to fill a uniform array of structures, do I have no choice but to retrieve the location of each variable within each structure of the array? (so I can submit the uniform values individually like a regular uniform variable)

glGetUniformLocation(programId, "test[0].a");
glGetUniformLocation(programId, "test[0].b");
glGetUniformLocation(programId, "test[0].c");
glGetUniformLocation(programId, "test[1].a");
glGetUniformLocation(programId, "test[1].b");
glGetUniformLocation(programId, "test[1].c");
.
.
.
glGetUniformLocation(programId, "test[n].a");
glGetUniformLocation(programId, "test[n].b");
glGetUniformLocation(programId, "test[n].c");


Like that?
Is there an alternative like filling a buffer object or something similar?

Thanks in advance.