I was able to solve this by creating local variables on screen, then calling a server action in a client action and assigning values to the variables in the same client action. Then passing those variables as array in highcharts. Refer images below.
Server action - I created server action that returns the required data and creates a new entity. In this server action, I assign values to variables.
In the same server action, i then assigned the values to itself with square brackets.
Client action - then I assigned the values (now in array format) to variables.

Highcharts - I passed those variables to data parameter so that it reflects as an array of values and plots them.
