You can’t extend builtins like that, it’s not going to typecheck if you add random properties to arrays. Arrays do not have the property data, the message is correct.
There is almost no situation where what you’re doing is a good idea. It’s very confusing, as it is extremely unexpected behaviour. Why are you trying to attach data that doesn’t live in the array to the array?