© 2018 CERN. For the high luminosity upgrade of the LHC at CERN, ATLAS is considering the addition of a High Granularity Timing Detector (HGTD) in front of the end cap and forward calorimeters at |z|= 3.5 m and covering the region 2.4 <|η|< 4 to help reducing the effect of pile-up. The chosen sensors are arrays of 50 μm thin Low Gain Avalanche Detectors (LGAD). This paper presents results on single LGAD sensors with a surface area of 1.3×1.3 mm2 and arrays with 2×2 pads with a surface area of 2×2 mm2 or 3×3 mm2 each and different implant doses of the p+ multiplication layer. They are obtained from data collected during a beam test campaign in autumn 2016 with a pion beam of 120 GeV energy at the CERN SPS. In addition to several quantities measured inclusively for each pad, the gain, efficiency and time resolution have been estimated as a function of the position of the incident particle inside the pad by using a beam telescope with a position resolution of few μm. Different methods to measure the time resolution are compared, yielding consistent results. The sensors with a surface area of 1.3×1.3 mm2 have a time resolution of about 40 ps for a gain of 20 and of about 27 ps for a gain of 50 and fulfil the HGTD requirements. Larger sensors have, as expected, a degraded time resolution. All sensors show very good efficiency and time resolution uniformity.