serial.write() five sensors and Processing To all of this, hope to formulate the question right.

In my project I have 5 sensors connected to Arduino, which I want to interpret via Seria.write() --> Processing.

Arduino:

firstSens = 100 + (155 * digitalRead(8));
secondSens = analogRead(A1)/4;
thirdSens = analogRead(A2)/4;
fourthSens = humData;
fifthSens = tempData;
int sensData[6] = {firstSens, secondSens, thirdSens, fourthSens, fifthSens};

int i;
for (i = 0; i &lt; 5; i = i + 1) {
  Serial.write(sensData[i]);
}


Processing:

serialInArray[serialCount] = inByte;
    serialCount++;

if (serialCount &gt; 4 ) {
  firstSens = serialInArray[0];
  secondSens = serialInArray[1];
  thirdSens = serialInArray[2];
  fourthSens = serialInArray[3];
  fifthSens = serialInArray[4];

  // print the values (for debugging purposes only):
  println(firstSens + "\t" + secondSens + "\t" + thirdSens + "\t" + fourthSens + "\t" + fifthSens);

  // Send a capital A to request new sensor readings:
  myPort.write('A');
  // Reset serialCount:
  serialCount = 0;


My problem is that sensors find their place in Processing's array randomly, so for example arduino's firstSens could be Processing's secondSens or fifthSens

Why is this happening and how can I control it?
What is happening is you are just spewing out a list of numbers:

4132
132
1928
3240
1239
238
3048
391
... etc ...


There is nothing anywhere to say what anything is.

You need to add that kind of information. Either as a "start of data" tag before each block, or with each line.  For instance:

---START OF DATA---
4132
132
1928
3240
1239
---START OF DATA---
238
3048
391
... etc ...


Or:

0:4132
1:132
2:1928
3:3240
4:1239
0:238
1:3048
2:391


It is then up to your processing application to interpret the data and work out what is what.

Personally I like using the second method since it means you don't have to send all the data every time - you can send different values at different speeds of update and maintain a "current value" at the Processing end. For instance if you have one value that updates frequently and others that don't:

3:4132
1:132
3:1928
3:3240
3:1239
2:238
3:3048
0:391


You don't even have to use numbers, you could use words:

pressure:4132
temperature:132
pressure:1928
pressure:3240
pressure:1239
humidity:238
pressure:3048
rainfall:391