This line allocates a new array for the right-hand-side every time you execute it, so it’s hardly surprising that it will allocate. It has nothing to do with whether you store the result in a mutable struct.
If you want to avoid allocation, you need to overwrite a pre-allocated vector. If you don’t know the size that you need in advance, you can always resize it as needed, for example:
resize!(input.data_a, length(states)) .= getindex.(states, 1)