Dynamically generate HTML list from JS array