How to make discontinuous UVs?

I’m making a voxel world in which terrain is made up of cubes. I grouped these cubes into meshes to be efficient, but if I want the sides of cubes to be mapped to a different texture than the rest, how would I do so? As in, I want more than one png to be mapped to a single mesh, or be able to map UV’s without lines being showed. (If you don’t know what I mean: [Lines at cube borders and darkened at a certain distance][1]).

UVs weren’t ment to be used that way, so how can I have multiple pngs on a single mesh without having to generate a custom texture each time (Though a viable solution, I’m trying to conserve memory)

(If you need a specific piece of code, I’ll post it)

Add padding around each section in the texture, or turn mipmapping off (not recommended, looks bad).