The location of protective devices, such as circuit breakers, reclosers, sectionalizers, and fuses, along with isolating switches in a distribution network is a key factor impacting the reliability performance. Furthermore, automatic restoration from intentional islanding with renewable-based distributed generators (DGs) or from alternate feeders can reduce outage times. In this paper, a mixed-integer linear program (MILP) formulation is proposed for protective device and switch allocation considering intentional islanding with distributed generation in distribution systems. The specific impact of each protective device type and isolating switch is modeled, e.g., momentary interruptions caused by reclosers. Efficient graph search algorithms combined with a directed graph representation of the distribution system allows for preprocessing of the network data and facilitates the formulation of an MILP. The formulation is able to efficiently compute optimal device allocations for multiple scenarios, revealing key insights, e.g., the location and capacity of DGs providing the greatest reliability benefit for a fixed protection budget. Numerical tests on realistic feeders and comparison with prior solutions show improved device allocations and lower objective function values.