By "accomplish", I'm assuming @scottmcm was trying to ask what higher-level goal you have in mind. We already know that what you immediately want is to fill a tuple; the question is why.
I'm working on a project where structs need to take parameters. (Such as struct SomeStruct<const x: i32> {})
I need to create an array of SomeStruct, but the x part of each element in the array might be different. (So I can't do let arr_of_some_struct: [SomeStruct<_>; 3] = [SomeStruct<1> {}, SomeStruct<2> {}, SomeStruct<3> {}]; or anything similar)
I decided on using tuples, as they can store items of multiple types.
Now I need a way to fill those tuples without writing the whole thing out manually. (As the amount of repeated code would be horrendous)
I too sense an XY problem here (between this and your last question). Note that you can't dynamically iterate or index a tuple (because each element is a different type, and Rust is statically typed). Using this data structure is going to be a pain [1]. Your horrendously redundant code issue will pop up everywhere.
If the main motivation is optimization, it's likely premature, and replacing bounds checks with 100s of monomorphized types may actually hinder optimization.
unless the entire program is itself generated, maybe↩︎