Added generic inproduct that can handle tuples and std::arrays