How to read in a list of integers into an array

I am open to any solution. I think the format is just [int, int, int, …, ] with possible extra white spaces and carriage returns.