Html Input Type File Javascript Array Functions