Have you given Rust a try? As far as I understand, it supports generics and defining your own data types pretty well, although I've never tried Rust myself.
Rust's polymorphism system is somewhat limited compared to, say, (GHC) Haskell. But, to the best of my knowledge, it is the best among languages aiming at mainstream.