Implementation of various join operations on arrays