Loop through the array, and since you don't have a timestamp set x to an incrementing value.
Something like this (untested as I'm on my phone)...
var x = 0;
var data = msg.payload
var len = data.length
for(x = 0; x < len; x++){
element1.data.push({
x : x,
y : data[x].SoC
})
}
//5. now add a labels [array] to element1
element1.labels = []; // add a .property called labels of type [array]
element1.labels.push(""); //add an empty string to the "labels" [array]
//Now add the element1 [array] into the chartData [array]
chartData.push(element1)
//Lastly, return the chartData as the payload
msg.payload = chartData;
return msg;
Edit....
That is a LOT of data. Don't be surprised if it's as slow as a slow gin on a slow night up on mount slowden!