How to create a nested list of variable depth with indexed elements
You can try Array
:
Array[c, {3, 3, 3, 3}]
arraydepth = 3;
Array[c, ConstantArray[3, arraydepth]]
To elaborate on b.gates.you.know.what's comment, this is a scalable version equivalent to kglr's solution:
Outer[c, Sequence @@ ConstantArray[{1, 2, 3}, 4]] === Array[c, {3, 3, 3, 3}]
True
{1, 2, 3}
can be a list of any elements.