Trap-induced shape resonances in an ultracold few-body system of an atom and static impurities