Define array, calculate array length, take out values

This is nice way how to add aditional inventory fiels. No need to change any code. Just insert new line: