There are quite a few constructs that already work in const, in particular some forms of mutability. the notable ones that do not, however, are for, array::map, and mutable references themselves. But since you start with a newly-to-add const value that can be your valid initializer before overwriting / copying the other elements.
const A: [&str; 8] = ["Tree"; 8];
const B: [&str; 9] = {
const T: &str = "newelement";
let mut v = [T; 9];
let mut i = 0;
loop {
if i >= 8 { break; }
// This only works becasue array indexing with usize is builtin.
v[i] = A[i];
i += 1;
}
v
};
That would be straightforward to provide the body here as a macro_rules!, too. Maybe even a good excercise to learn many things about the writing of macros.