Correctly wiring batteries for solar charging
If these batteries are of the same type (all flooded lead-acid, or all AGM, or all gel-cell), and they are all relatively equal in age and usage, then you can connect them together and they will all charge.  The problem is if one of the batteries is older than the others, or has been abused, then the charging will not be equal, and all batteries may not get fully charged, or will be overcharged.

It is unlikely that this will cause dangerous problems, but if the batteries are not well-matched then you will get sub optimal charging.

If the batteries are not of the same type, then you definitely don't want to connect them together.