# Exported local variable not appearing in pattern data
In ImHex Pattern Language you cannot export a whole array at once: exporting single elements and collecting them into an array works, but exporting the array itself does not. Instead, export the individual elements inside a struct, then build a non-exported array of those structs. For large arrays, seal them so they skip per-element metadata (std::mem::Bytes[size] gives an automatically sealed struct). Also note pattern evaluation is interpreted from an AST, so filling big arrays in functions is much slower than the built-in visualizers.
## Context from the issue
gh:WerWolv/ImHex#2785: Issue WerWolv/ImHex#2785 (closed, 26 comments): ### Operating System
Linux
### What's the issue you encountered?
Let me preface this by saying, if I'm abusing the Pattern Language, that's a reasonable response, but I am trying to do the following:
there is data that is loaded into a struct. However, in its default state, the visualizations I want just won't work. As I result, I tried to modify the data myself with a function. The result of this function being placed into a local variable that is then exported. This exported field could then be visualized, achieving my goal.
As for code, first, some Python to create a dummy...