We investigate the localization pattern of interacting impurities, which are trapped in a lattice potential and couple to a Bose gas. For small interspecies interaction strengths, the impurities populate the energetically lowest Bloch state or localize separately in different wells with one extra particle being delocalized over all the wells, depending on the lattice depth. In contrast, for large interspecies interaction strengths we find that due to the fractional filling of the lattice and the competition of the repulsive contact interaction between the impurities and the attractive interaction mediated by the Bose gas, the impurities localize either pairwise or completely in a single well. Tuning the lattice depth, the interspecies and intraspecies interaction strength correspondingly allows for a systematic control and engineering of the two localization patterns. The sharpness of the crossover between the two states as well as the broad region of their existence supports the robustness of the engineering. Moreover, we are able to manipulate the ground state's degeneracy in the form of triplets, doublets and singlets by implementing different boundary conditions, such as periodic and hard wall boundary conditions. where ĉ † is the field operator of the lattice A bosons, m A their mass, V 0 the lattice depth, g AA the intraspecies interaction strength, k the number of wells in the lattice and L is the length of the system. The B species is described by the Hamiltonian of the Lieb-Liniger model [63-65] for periodic boundary conditions New J. Phys. 20 (2018) 103042 K Keiler and P Schmelcher