Dynamically building an unordered list from an array for performance