Create an object that you fill with the data where the y-series is your “series of numbers in an array”:
{"x": [1, 2, 3], "y": [3, 1, 6]}
and feed that to the line chart. Can be appstore-app ‘AnyChart’ or ‘Charts’.
Have a look at mydemoversion8-sandbox.mxapps.io/p/charts for some examples.
Which widget are you using and what is the related domain model?
You can use https://appstore.home.mendix.com/link/app/105695/ or https://appstore.home.mendix.com/link/app/106517/ for this.