How to display the array input in html forms?

How should you get the array from the user and then store it in the changeset,

let’s say the array should contain numbers, so do I need to display an input field that contains the list of numbers join-ed using javascript (e.g. by comma), or is there a better way?

What exactly are you trying to achieve?
If you just want an input for entering multiple numbers, you could use a textarea which will give you all numbers separated by \n.
Or you could generate multiple inputs with a form[field][] name and then the browser will concatenate all this values into a list for you.