[feature] add duplicate function to structures

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>