This function generates plate IDs from the dimensions of the grid and
spot matrices. Note that this function only applies to arrays with a
regular plate layout, where the number of spots is a multiple of the
number of wells on a plate (usually 96 or 384) and each well contributes
exactly one spot. It should thus be used with caution.