Dissipation caused by nonhomogeneous bosonic finite chain environments (implementable in, e.g., segmented ion traps) is investigated through an exact diagonalization approach, avoiding common approximations used to describe open systems. Different spectral densities, including band gaps, can be engineered to separately assess different factors leading to memory effects, namely, the environment's size, temperature, proximity of the cutoff frequency, the spectral density's shape (sub-Ohmic, Ohmic, super-Ohmic), and the strength of its coupling to the system. Non-Markovianity is quantified with two recently introduced measures related to information backflow and nondivisibility of the system dynamical map. By sweeping the bath spectrum via tuning of the system frequency we show strongest memory effects at band-gap edges and provide an interpretation based on energy flow between system and environment. A system weakly coupled to a stiff chain ensures a Markovian dynamics, while the size of the environment as well as the local density of modes are not substantial factors. We show an opposite effect when increasing the temperature inside or outside the spectral band gap. Further, non-Markovianity arises for larger (negative and positive) powers of algebraic spectral densities, being the Ohmic case not always the most Markovian one.