Append a value to the list n
times. Allocates more memory as necessary. Invalidates pointers if additional memory is needed. The function is inline so that a comptime-known value
parameter will have a more optimal memset codegen in case it has a repeated byte pattern.