Construction of Wavelets and Multiwavelets Basis: A Generalized Method