Adding a generic generate multiple data function.