Most of the time Serial.read() will have nothing to read so will return -1.
You need use Serial.available() and only read the serial input if something is available. As the loop() function repeats much faster than serial data arrives you also need to know when the serial data is complete. This is often done by wrapping the serial data in start and end markers, perhaps '<' and '>' and separating the data using a comma.
Using this method you can reliably read serial data into an array and when it has all been received parse out the values it contains and use them. Look at Serial input basics to see some of the ideas in practice.