Free modules and algebras over a chosen ring, with specified basis