Arrays are best used for data that can be numerically indexed, such as lists.
If you need to index information in a different way, consider using an object:
var files = {}; // <== This is an empty object
files[someFileId] = thatFilesDate;
files[someOtherFileId] = thatOtherFilesDate;
Could I use an associative array?
It seems like you might be familiar with PHP. In PHP, associative arrays are unique because they allow for both numeric and named lookups. However, JavaScript does not have this feature built-in. While you can create something similar, most of the time you just need name/value pairs, which is where objects come in handy in JavaScript.