Hello all , I want your help in adding two consecutive msg.payload array[] and then finding running average for latest value + stored value

I still don't fully understand what you are trying to do. Can you provide an example of the sequence of messages that might come in, and what you want out? An actual example with numbers.