Sorry for the late reply. The issue might have been two fold for me. I don't know which one helped exactly
1) In model explorer, where variables are initialized, arrays have to be initialized with a vector size [1 x] instead of just x. It's in the picture attached (matlab vector initialization).
2) In my chart itself, I initialized the vector like this in a reset state. It's in the picture attached (matlab vector reset)
I also attached the new chart that works for me. Hopefully this helps other people. Amish