Implement the data structure dynamic doubly linked list (DoublyLinkedList) - list, the elements of which have pointers both to the next and the previous elements. Implement the operations for adding, removing and searching for an element, as well as inserting an element at a given index, retrieving an element by a given index and a method, which returns an array with the elements of the list.