You really do need to work out what your code is doing. You're always going to have problems if you use code with out understanding it. In this case the distances are held in the cm[] array. cm[0] is distance for sensor 1, cm[1] for sensor 2 etc. (array numbering always starts at 0 ).
So is that the missing bit of information you needed? There's a good write-up on arrays at array - Arduino Reference
Steve