Insertion and extension theorems for lattice-valued functions on preordered topological spaces