@yoba as @Colin suggested, buffer parser takes all the pain out of making sense of your data.
e.g...
Demo flow...
[{"id":"ab597b10.1d0db8","type":"function","z":"5bd4aa78.31d114","name":"","func":"const buf = Buffer.from(msg.payload.buffer);\nbuf.swap16();\n\nvar my_list, i;\nconst len = (msg.payload.buffer.length);\nmy_list = [];\n\n// push values 1 by 1 in array\nmy_list.push(buf.readFloatLE(0));\nmy_list.push(buf.readFloatLE(4));\nmy_list.push(buf.readFloatLE(8));\n\n// // push values in for loop\n// for (i=0; i<len; i=+ 4){\n// my_list.push(buf.readFloatLE(i));\n// }\n\nmsg.payload = my_list;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":924,"y":96,"wires":[["fdbbcc26.59d768"]]},{"id":"fdbbcc26.59d768","type":"debug","z":"5bd4aa78.31d114","name":"Function","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1100,"y":96,"wires":[]},{"id":"cb3e7a56.719758","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":623,"y":192,"wires":[["ed6c26a7.0bfb08"]],"l":false},{"id":"ed6c26a7.0bfb08","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":720,"y":192,"wires":[["25617943.c50d26"]]},{"id":"25617943.c50d26","type":"buffer-parser","z":"5bd4aa78.31d114","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"item1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"item2","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"item3","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":934,"y":192,"wires":[["b1fec79a.da4a78"]]},{"id":"b1fec79a.da4a78","type":"debug","z":"5bd4aa78.31d114","name":"Parser","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1090,"y":192,"wires":[]},{"id":"c2aee09b.5ac13","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":623,"y":96,"wires":[["567c6031.02666"]],"l":false},{"id":"567c6031.02666","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":720,"y":96,"wires":[["ab597b10.1d0db8"]]},{"id":"97782186.7c8bf","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":623,"y":464,"wires":[["c8767342.8d7d3"]],"l":false},{"id":"c8767342.8d7d3","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus 3 floats","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":740,"y":464,"wires":[["102a549f.38297b"]]},{"id":"102a549f.38297b","type":"buffer-parser","z":"5bd4aa78.31d114","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"item1","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":934,"y":464,"wires":[["b365ecd6.bfe85"]]},{"id":"b365ecd6.bfe85","type":"debug","z":"5bd4aa78.31d114","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1110,"y":464,"wires":[]},{"id":"ed450c73.8a799","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":623,"y":512,"wires":[["d0aa6936.981118"]],"l":false},{"id":"d0aa6936.981118","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus 5 floats","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":740,"y":512,"wires":[["102a549f.38297b"]]},{"id":"11dd3da7.31a7f2","type":"comment","z":"5bd4aa78.31d114","name":"Dynamic length","info":"","x":656,"y":432,"wires":[]},{"id":"73e2049d.d0ac6c","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":623,"y":304,"wires":[["f7146e75.96401"]],"l":false},{"id":"f7146e75.96401","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":720,"y":304,"wires":[["4b1fe3a0.88767c"]]},{"id":"4b1fe3a0.88767c","type":"buffer-parser","z":"5bd4aa78.31d114","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"item1","offset":0,"length":3,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":934,"y":304,"wires":[["6dff71a4.7b454"]]},{"id":"6dff71a4.7b454","type":"debug","z":"5bd4aa78.31d114","name":"Parser","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1090,"y":304,"wires":[]},{"id":"c04113cd.82e42","type":"comment","z":"5bd4aa78.31d114","name":"As a fixed length array","info":"","x":676,"y":272,"wires":[]},{"id":"4c462fe4.cd887","type":"comment","z":"5bd4aa78.31d114","name":"As 3 items (buffer parser)","info":"","x":686,"y":160,"wires":[]},{"id":"34e9a1cf.4082ee","type":"comment","z":"5bd4aa78.31d114","name":"As 3 items (original)","info":"","x":666,"y":64,"wires":[]},{"id":"e7cd2782.f17988","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":639,"y":800,"wires":[["a8479ff8.65711"]],"l":false},{"id":"a8479ff8.65711","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":736,"y":800,"wires":[["489df60e.e63538"]]},{"id":"489df60e.e63538","type":"buffer-parser","z":"5bd4aa78.31d114","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"voltage","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"current","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"freq","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":950,"y":800,"wires":[["852c70cc.67a61"]]},{"id":"852c70cc.67a61","type":"debug","z":"5bd4aa78.31d114","name":"Parser","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1106,"y":800,"wires":[]},{"id":"3cb3e1e2.c74fce","type":"comment","z":"5bd4aa78.31d114","name":"As named items in an object","info":"","x":712,"y":768,"wires":[]},{"id":"cfcbc82e.a1b488","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":639,"y":944,"wires":[["7481222b.c1f99c"]],"l":false},{"id":"7481222b.c1f99c","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":736,"y":944,"wires":[["454201fc.cc2a8"]]},{"id":"454201fc.cc2a8","type":"buffer-parser","z":"5bd4aa78.31d114","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"voltage","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"current","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"freq","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":true,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":950,"y":944,"wires":[["d393f9c4.cdf1c8"]]},{"id":"d393f9c4.cdf1c8","type":"debug","z":"5bd4aa78.31d114","name":"Parser","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1106,"y":944,"wires":[]},{"id":"785aa1dd.9dcad","type":"comment","z":"5bd4aa78.31d114","name":"As individual named items ","info":"","x":702,"y":912,"wires":[]},{"id":"6cab2d8c.6957a4","type":"inject","z":"5bd4aa78.31d114","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":639,"y":1216,"wires":[["ca7502dc.43e59"]],"l":false},{"id":"ca7502dc.43e59","type":"function","z":"5bd4aa78.31d114","name":"Fake Modbus","func":"msg.payload = {\n buffer : Buffer.from([0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8])\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":736,"y":1216,"wires":[["d05a32ed.38439"]]},{"id":"d05a32ed.38439","type":"buffer-parser","z":"5bd4aa78.31d114","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"voltage","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"current","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"freq","offset":8,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":3,"x":950,"y":1216,"wires":[["3af61c42.774c84"],["5ac54fd0.f5baa"],["b31006a2.ad4f58"]]},{"id":"3af61c42.774c84","type":"debug","z":"5bd4aa78.31d114","name":"float 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1106,"y":1184,"wires":[]},{"id":"8bd1cac3.6f5098","type":"comment","z":"5bd4aa78.31d114","name":"As individual items fanned out","info":"","x":712,"y":1184,"wires":[]},{"id":"5ac54fd0.f5baa","type":"debug","z":"5bd4aa78.31d114","name":"float 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1106,"y":1216,"wires":[]},{"id":"b31006a2.ad4f58","type":"debug","z":"5bd4aa78.31d114","name":"float 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1106,"y":1248,"wires":[]}]