Apply function to elements in parallel using futures
