I have an idea, it would be so much easier to use photoshop if adobe put a plugin or something like array command (in autodesk softwares) so that photos automatically place at a certain distance from each other.
How would you like the image aligned. Images can have any aspect ratio and be any size. Documents have a canvas that also has an aspect ratio and size. What you ask for is more complicated then flowing proportional text where font and font size may change with the next character. The scattering of different aspect ratio and size images on a canvas would most likely not be appealing. Even if Photoshop expanded the documents canvas Photoshop still has limits, I believe the max canvas size Photoshop will support is 300,000px by 300,000px with up to 8,000 layers.
A Photoshop Script can resize and layout images on a canvas. Adobe installs Contact Sheets II script you can use in Photoshop to distribute your images on canvases and you can download my toolkit and tile images on a canvas with my Place Image Roll script. That will resize your image to fill a common tile size and mask them to the tile. The Script will calculate the Canvas size required for tiling the image including the inter tiling space and canvas borders.