Numerical simulations of the dynamics of a slippery particle in Newtonian and viscoelastic fluids subjected to shear and Poiseuille flows